home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap08 / dun8_2.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  861 b   |  34 lines

  1. <html>
  2. <head>
  3. <title>Where Do You Wanna Go?</title>
  4. </head>
  5. <script language="JavaScript">
  6. <!---// hide the script from older browsers
  7.  
  8. //this is the 'jump' function, that we'll use to accept input from
  9. //the form, and redirect the user to what the URL they entered
  10. //this function is called with one argument (frm) which is a reference
  11. //to the form that the user filled in.
  12.  
  13. function jump(frm){
  14.    //the frm object has an element called URL, we'll use that value
  15.    //for the new location for this window.
  16.    window.location = frm.URL.value;
  17.    }
  18. }
  19.  
  20. // end hiding --->
  21. </script>
  22. <body bgcolor="#FFFFFF">
  23. <center>
  24. <form>
  25. <h2>Where To?</h2>
  26. <br>
  27. <input type="text" name="URL" value="" size=35>
  28. <br>
  29. <input type="button" onClick="jump(this.form)" value="Jump!">
  30. </form>
  31. </center>
  32. </body>
  33. </html>
  34.